#!/bin/bash

# This script is to start the Receptor of RabbitMQ. There are two parameters to be passed on it.
# It is necessary to have Java installed on the machine and it's path configured.
# The first parameter is the IP of the RabbitMQ-server and the second is the port number.
# It is necessary to be installed RabbitMQ-server on the RabbitMQ-server machine.
# it can be done by "apt-get install rabbitmq-server"
# If you are on the RabbitMQ-server it is not necessary to pass the parameters, 
# because the Java program assume localhost:5672

export rabbitMQ_libs=.:lib/commons-io-1.2.jar:lib/commons-cli-1.1.jar:lib/rabbitmq-client.jar:lib/slf4j-api.jar:lib/libthrift-0.8.0.jar:lib/nlog4j-1.2.19.jar:lib/commons-lang-2.2.jar:dist/jit-clouds-mda-lite.jar

java -cp $rabbitMQ_libs br.ufba.lasid.jitclouds.mda.queue.Receiver -ip 192.168.188.9 -port 5672 -queue queueName
